﻿
using System;
using System.Collections.Generic;
using System.Text;

namespace HttpClient
{
	public static class DoPost
	{
		public class DoPostUrl
		{
            HttpRequest request = new HttpRequest();
            public HeaderConfiguration<DoPostUrl> Using { get; private set; }
            public ContentConfiguration<DoPostUrl> InContent { get; private set; }
			
			public DoPostUrl(String url)
			{
				request.url = url;
				request.method = HttpMethod.POST;
				Using = new HeaderConfiguration<DoPostUrl>(request, this);
                InContent = new ContentConfiguration<DoPostUrl>(request, this, Using);
			}
			
			public HttpResponse ThenCall(HTTPClient client)
			{
				return client.Execute(request);
			}
		}
		
		public static DoPostUrl On(String url)
		{
			return new DoPostUrl(url);
		}
	}
}
